import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '期数',
    align:"center",
    dataIndex: 'period'
  },
  {
    title: '开始时间',
    align:"center",
    dataIndex: 'startTime',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '结束时间',
    align:"center",
    dataIndex: 'endTime',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '最多几票',
    align:"center",
    dataIndex: 'most'
  },
    {
    title: '文字说明',
    align:"center",
    dataIndex: 'description'
  },
];

//子表列表数据
export const gbtIntegralVoteColumns: BasicColumn[] = [
  {
    title: '名称',
    align:"center",
    dataIndex: 'name'
  },
  {
    title: '用户id',
    align:"center",
    dataIndex: 'userid'
  },
  {
    title: '一级部门',
    align:"center",
    dataIndex: 'firstDept'
  },
  {
    title: '二级部门',
    align:"center",
    dataIndex: 'secondDept'
  },
  {
    title: '岗位',
    align:"center",
    dataIndex: 'title'
  },
  {
    title: '评选类型',
    align:"center",
    dataIndex: 'voteType_dictText'
  },
  {
    title: '理由',
    align:"center",
    dataIndex: 'reason',
  },
  {
    title: '票数',
    align:"center",
    dataIndex: 'votes'
  },
  {
    title: '普通投票',
    align:"center",
    dataIndex: 'normalVote'
  },
  {
    title: '委员会投票',
    align:"center",
    dataIndex: 'vipVote'
  },
  {
    title: '期数',
    align:"center",
    dataIndex: 'period'
  },
];

// 高级查询数据
export const superQuerySchema = {
  period: {title: '期数',order: 0,view: 'text', type: 'string',},
  startTime: {title: '开始时间',order: 1,view: 'date', type: 'string',},
  endTime: {title: '结束时间',order: 2,view: 'date', type: 'string',},
  most: {title: '最多几票',order: 3,view: 'number', type: 'number',},
};
